package util;

import android.content.res.Resources;
import android.util.DisplayMetrics;

import androidui.com.sj.latte.app.Latte;

/**
 * Created by wzp on 2019/2/25 0025.
 * <p>
 * 描述  ：工具类
 */

public class DimenUtil {
    //获取屏幕宽度
    public static int getScreenWidth(){
        final Resources resources = Latte.getApplication().getResources();
        final DisplayMetrics dm = resources.getDisplayMetrics();
        return dm.widthPixels;
    }

    public static int getScreenHeight(){
        final Resources resources = Latte.getApplication().getResources();
        final DisplayMetrics dm = resources.getDisplayMetrics();
        return dm.heightPixels;
    }

}
